$(function() {
	$("#new-course").click(function() {
		var index = layer.open({
			type: 2,
			title: '新建课程',
			fixed: false, //不固定
			maxmin: true,
			closeBtn: 1,
			scrollbar: false,
			content: '../teapage/teacherNewCourse.jsp',
			end: function () {
                location.reload();
            }
		});
		layer.full(index);
	});
	
	$("#myCourse").click(function() {
		$("#my-course-container").show();
		$("#today-lesson-container").hide();
		showAndHide($("#myCourse"),$("#todayLesson"));
	});
	$("#AssiCourse").click(function() {
		$("#my-course-container").show();
		$("#today-lesson-container").hide();
		showAndHide($("#AssiCourse"),$("#todayAssiLesson"));
	});
	$("#todayLesson").click(function() {
		$("#my-course-container").hide();
		$("#today-lesson-container").show();
		showAndHide($("#todayLesson"),$("#myCourse"));
	});
	$("#todayAssiLesson").click(function() {
		$("#my-course-container").hide();
		getLessonAssistant();
		$("#today-lesson-container").show();
		showAndHide($("#todayAssiLesson"),$("#AssiCourse"));
	});
});
var showAndHide = function(show,hide) {
	show.attr("style","color: #f90c0c;");
	hide.removeAttr("style");
};